Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing setEncoding #4761

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nbrugger-tgm
Copy link

@nbrugger-tgm nbrugger-tgm commented Oct 17, 2024

Why

  • lazy configuration: The lack cause pain when working in a remotely up to date gradle enviroment and
  • fixed immutable task dependencies: this is a blocker since you have no modify theese task dependencies (resolve depending compileTestJava for example)
  • setting the encoding didn't work at all

Changes

  • fix encoding setter
  • enable lazy evaluation by
    • replacing all Task configurations with gradles Property types
    • using register instead of create to register the task
  • remove wrongly set task dependencies that can cause circular dependencies. Task dependencies are now inferred by the set classpath. When gradle detects that an output of a task (like compileJava) is used an automatic dependency is formed and resolve will always execute compileJava first. The advantage is that this is dynamic. If one does NOT want compileJava to be executed it won't be as soon as nothing of compileJava is on the configured classpath

@nbrugger-tgm nbrugger-tgm changed the title feat(gradle-plugin): enable lazy evaluation, implicit task dependencies feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing setEncoding Oct 17, 2024
@nbrugger-tgm nbrugger-tgm force-pushed the gradle/enable-lazy-configuration branch from 140edb6 to 57c56d2 Compare October 18, 2024 07:51
changes:
  - enable lazy evaluation by
    - replacing all Task configurations with gradles Property types
    - using `register` instead of `create` to register the task
  - remove wrongly set task dependencies that can cause circular dependencies. Task dependencies are now inferred by the set classpath. When gradle detects that an output of a task (like compileJava) is used an automatic dependency is formed and `resolve` will always execute compileJava first. The advantage is that this is dynamic. If one does NOT want `compileJava` to be executed it won't be as soon as nothing of compileJava is on the configured classpath
@nbrugger-tgm nbrugger-tgm force-pushed the gradle/enable-lazy-configuration branch from 57c56d2 to b7d4a37 Compare October 18, 2024 07:53
@nbrugger-tgm
Copy link
Author

Sorry for the force pushes, i had to fix the commit it had the wrong commiter was not signed and i messed up the commit message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant